﻿using System.Linq.PageList;
using Dyao.Book.Contract;
using Dyao.Book.Entity;

namespace Dyao.Book.Repository.Abstractions
{
    public interface IOperationLogRepository : IDataRepository<OperationLogEntity>
    {
        /// <summary>
        /// 批量添加
        /// </summary>
        /// <param name="entities">添加实体</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns></returns>
        Task BulkInsertAsync(IEnumerable<OperationLogEntity> entities, CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="pageFilter">分页筛选器</param>
        /// <param name="cancellationToken">取消操作的通知</param>
        /// <returns>操作信息</returns>
        Task<IPageList<OperationLogEntity>> GetPageListAsync(IPageFilter<OperationLogFilterDto> pageFilter, CancellationToken cancellationToken = default);
    }
}
